from django.db import models


# Create your models here.
class User(models.Model):
    class Meta:
        verbose_name = verbose_name_plural = '用户表'

    account = models.CharField(max_length=64, unique=True, verbose_name='账号')
    password = models.CharField(max_length=64, verbose_name='密码')
    username = models.CharField(max_length=128, blank=True, verbose_name='用户名')
    money = models.DecimalField(max_digits=12, decimal_places=2, default=0, verbose_name='余额')
    gender = models.CharField(max_length=1, default='M', verbose_name='性别', choices=(('M', '男'), ('F', '女'))) # 'M'表示男 ''表示未知
    tel = models.CharField(max_length=16, default='', verbose_name='电话号码', blank=True)

    def __str__(self):
        return self.account